package org.car.world.service;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.car.world.core.entily.OrderTable;
import org.springframework.cache.annotation.CachePut;
import org.springframework.cache.annotation.Cacheable;

public interface OrderService {

    @CachePut(value = "deleteOrder", keyGenerator = "cacheKeyGenerator")
    int deleteByPrimaryKey(Integer orderId);

    @CachePut(value = "InsertOrder", keyGenerator = "cacheKeyGenerator")
    int insert(OrderTable record);

    @Cacheable(value = "Order", keyGenerator = "cacheKeyGenerator")
    OrderTable selectByPrimaryKey(Integer orderId);

    List<OrderTable> selectByPrimaryKeyList(Integer merchantsId);

    List<OrderTable> selectByPrimaryKeyListNew(Integer merchantsId);

    @Cacheable(value = "OrderList", keyGenerator = "cacheKeyGenerator")
    List<OrderTable> selectByPrimaryKeyListLimit(Integer merchantsId, Integer form, Integer size);

    @Cacheable(value = "OrderListDate", keyGenerator = "cacheKeyGenerator")
    List<OrderTable> selectByPrimaryKeyDateListLimit(Integer merchantsId, String orderdate, Integer form, Integer size);

    List<OrderTable> selectByPrimaryKeyDateList(Integer merchantsId, String orderdate);

    @Cacheable(value = "OrderAll", keyGenerator = "cacheKeyGenerator")
    List<OrderTable> selectAll();

    @Cacheable(value = "OrderListCount", keyGenerator = "cacheKeyGenerator")
    int selectByPrimaryKeyListCount(Integer merchantsId);

    @Cacheable(value = "OrderListDateCount", keyGenerator = "cacheKeyGenerator")
    int selectByPrimaryListOkCount(Integer merchantsId);

    @Cacheable(value = "OrderListDateCount", keyGenerator = "cacheKeyGenerator")
    int selectByPrimaryKeyDateListCount(Integer merchantsId, String orderdate);

    int updateByPrimaryKey(OrderTable record);

    List<OrderTable> selectByPrimaryKeyListSta(Integer merchantsId);

    int selectByPrimaryKeyListStaCount(Integer merchantsId);

    List<OrderTable> selectByPrimaryKeyListNewLimit(Integer merchantsId, Integer form, Integer size);


    List<OrderTable> selectByPrimaryKeyStaList(Integer merchantsId);

    int selectByPrimaryListStaCount(Integer merchantsId);

    List<OrderTable> selectByPrimaryKeyListStaLimit(Integer merchantsId, Integer form, Integer size);
}